﻿using System;

namespace FlitBit.Parse
{
	/// <summary>
	/// Indicates the kinds of token that may follow.
	/// </summary>
	[Flags]
	public enum TokenFollowedBy
	{
		/// <summary>
		/// Indicates any token may follow.
		/// </summary>
		Any = 0,
		/// <summary>
		/// Indicates that only whitespace may follow.
		/// </summary>
		Whitespace = 0x01,
		/// <summary>
		/// Indicates that only symbols may follow.
		/// </summary>
		Symbol = 0x02,
		/// <summary>
		/// Indicates that only operators may follow.
		/// </summary>
		Operator = 0x04,
		/// <summary>
		/// Flag that inverts another value.
		/// </summary>
		Not = 0x08,

		#region Convenience declarations
		/// <summary>
		/// Indicates anything but whitespace may follow.
		/// </summary>
		NotWhitespace = Not | Whitespace,
		/// <summary>
		/// Indicates anything but a symbol may follow.
		/// </summary>
		NotSymbol = Not | Symbol,
		/// <summary>
		/// Indicates that anything but an operator may follow.
		/// </summary>
		NotOperator = Not | Operator,

		/// <summary>
		/// Indicates that whitespace or symbols may follow.
		/// </summary>
		WhitespaceOrSymbol = Whitespace | Symbol,
		/// <summary>
		/// Indicates that anything but whitespace or symbols may follow.
		/// </summary>
		NotWhitespaceOrSymbol = Not | WhitespaceOrSymbol,

		/// <summary>
		/// Indicates that whitespace or operators may follow.
		/// </summary>
		WhitespaceOrOperator = Whitespace | Operator,
		/// <summary>
		/// Indicates that anything but whitespace or operators may follow.
		/// </summary>
		NotWhitespaceOrOperator = Not | WhitespaceOrOperator,

		/// <summary>
		/// Indicates whitespace, symbols, or operators may follow.
		/// </summary>
		WhitespaceOrSymbolOrOperator = WhitespaceOrSymbol | Operator,
		/// <summary>
		/// Indicates anything but whitespace, symbols, or operators may follow.
		/// </summary>
		NotWhitespaceOrSymbolOrOperator = Not | WhitespaceOrSymbolOrOperator,

		/// <summary>
		/// Indicates symbols or operators may follow.
		/// </summary>
		SymbolOrOperator = Symbol | Operator,
		/// <summary>
		/// Indicates anything but symbols or operators may follow.
		/// </summary>
		NotSymbolOrOperator = Not | SymbolOrOperator,
		#endregion

	}
}